#ifndef HELPWINDOW_H
#define HELPWINDOW_H

#include <QApplication>
#include <QMainWindow>
#include <QPushButton>
#include <QHelpEngine>
#include <QHelpContentWidget>
#include <QHelpIndexWidget>
#include <QTabWidget>
#include <QSplitter>
#include <QTextBrowser>
#include <QFileInfo>
#include <QMessageBox>
#include <HelpBrowser.h>
#include <QVBoxLayout>
#include <QMutex>
#include <QMutex>
#include <QMutex>
#include <QCloseEvent>

// 帮助窗口类
class HelpWindow : public QDialog
{
    Q_OBJECT
public:
    static HelpWindow* getInstance(const QString& helpFile, QWidget* parent = nullptr);

    ~ HelpWindow() {
        qInfo() << "~ HelpWindow()";
    }

private:
    HelpWindow(const QString &helpFile, QWidget *parent = nullptr);
public:
    void showHelpPage(const QString &page);
    void showHelp(const QString& page);
protected:
    void closeEvent(QCloseEvent* event) override;
private:
    QHelpEngine *m_helpEngine;
    HelpBrowser *m_textBrowser;
    QHelpContentWidget *contentWidget;
public:
    static QString INDEX_PAGE;
    static QString Q_ICON;
    static QString WINDOW_TITLE;
};
#endif // HELPWINDOW_H
